package com.union.core.doc.model;

import java.io.File;
import java.util.Date;

import com.mysql.jdbc.StringUtils;
import com.union.core.model.BaseModel;

/**
 * 头文件模板
 * @author leochen
 *
 */
public class DocTemplate extends BaseModel{
	private String title;           //头文件标题            
	private String file_name;       //服务器保存文件名称
	private String file_path;       //服务器保存文件路径
	private String file_type;       //上传文件类型         
	private String template_type;   //头文件类别            
	private long belong_section;  //所属部门               
	private boolean effect_flag;     //有效标志               
	private long create_userid;   //创建人                  
	private Date create_time;     //创建日期
	private String belong_section_name;//所属部门 名称
	private String template_type_name;//头文件类型 名称
	private File templateFile;
	private String templateFileFileName;
	private String templateFileContentType;
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getFile_name() {
		return file_name;
	}
	public void setFile_name(String file_name) {
		this.file_name = file_name;
	}
	public String getFile_path() {
		return file_path;
	}
	public void setFile_path(String file_path) {
		this.file_path = file_path;
	}
	public String getFile_type() {
		return file_type;
	}
	public void setFile_type(String file_type) {
		this.file_type = file_type;
	}
	public String getTemplate_type() {
		return template_type;
	}
	public void setTemplate_type(String template_type) {
		this.template_type = template_type;
	}
	public long getBelong_section() {
		return belong_section;
	}
	public void setBelong_section(long belong_section) {
		this.belong_section = belong_section;
	}
	public boolean isEffect_flag() {
		return effect_flag;
	}
	public void setEffect_flag(boolean effect_flag) {
		this.effect_flag = effect_flag;
	}
	public long getCreate_userid() {
		return create_userid;
	}
	public void setCreate_userid(long create_userid) {
		this.create_userid = create_userid;
	}
	public Date getCreate_time() {
		return create_time;
	}
	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}
	public String getBelong_section_name() {
		return belong_section_name;
	}
	public void setBelong_section_name(String belong_section_name) {
		this.belong_section_name = belong_section_name;
	}
	public String getTemplate_type_name() {
		return template_type_name;
	}
	public void setTemplate_type_name(String template_type_name) {
		this.template_type_name = template_type_name;
	}
	public File getTemplateFile() {
		return templateFile;
	}
	public void setTemplateFile(File templateFile) {
		this.templateFile = templateFile;
	}
	public String getTemplateFileFileName() {
		return templateFileFileName;
	}
	public void setTemplateFileFileName(String templateFileFileName) {
		this.templateFileFileName = templateFileFileName;
	}
	public String getTemplateFileContentType() {
		return templateFileContentType;
	}
	public void setTemplateFileContentType(String templateFileContentType) {
		this.templateFileContentType = templateFileContentType;
	}
	
	public void copy(DocTemplate docTemplate){
		this.title = docTemplate.getTitle();
		if(!StringUtils.isNullOrEmpty(docTemplate.getFile_name()))this.file_name = docTemplate.getFile_name();
		if(!StringUtils.isNullOrEmpty(docTemplate.getFile_path()))this.file_path = docTemplate.getFile_path();
		if(!StringUtils.isNullOrEmpty(docTemplate.getFile_type()))this.file_type = docTemplate.getFile_type();
		this.template_type = docTemplate.getTemplate_type();
		this.belong_section = docTemplate.getBelong_section();
	}
}
